<!doctype html>
<html lang="en">
<head>
   <meta charset="UTF-8" />
  <title>allsins18k</title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
  <link href="__CSS__/normalize.css" rel="stylesheet" media="screen">
  <link href="__JS__/bootstrap/css/bootstrap.css" rel="stylesheet" media="screen">
  <link href="__CSS__/common.css" rel="stylesheet">
  <link href="__CSS__/index.css" rel="stylesheet">
   <link href="__CSS__/category.css" rel="stylesheet">
  <link href="__JS__/bootstrap/css/bootstrap-responsive.css" rel="stylesheet" media="screen">
  <script src="__JS__/jquery.js"></script>
  <script src="__JS__/bootstrap/js/bootstrap.min.js"></script>
</head>

<body>
  <!--导航栏  开始-->
  <div class="navbar navbar-inverse navbar-fixed-top">
    <div class="navbar-inner">
      <div class="container">
        <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
        <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </a>

        <!-- Be sure to leave the brand out there if you want it shown -->
        <a class="brand" href="__APP__">
          <img src="__IMG__/logo.jpg" alt="">
        </a>
        <!-- Everything you want hidden at 940px or less, place within here -->
        <div class="nav-collapse collapse">
          <ul class="nav" id='as_nav'>
       		<li class={$self == '__APP__' ? "active" :''}><a href="__APP__">首頁</a></li>
       		<li class={$action == 'brand' ? "active" :''}><a href="{:U('index/brand')}">品牌介紹</a></li>
          	<volist name='nav' id='vo'>
	            <li class={$vo[term_id] == $_GET[tid] ? "active" :''}>
	            	<notempty name='vo.url'>
              	  		<a href="{$vo.url}" target='_blank'>{$vo.name}</a>
              	  	<else />
              	  		<a href="{:U('product/index',['tid'=>$vo[term_id]])}">{$vo.name}</a>

	            	</notempty>
	            </li>
          	</volist>

          </ul>

<!--           <div class="navbar-search pull-right">
            <input type="text" class="search-query span2" placeholder="搜索">
            <a href="#"><i class="icon-search"></i></a>
          </div> -->
          <!-- .nav, .navbar-search, .navbar-form, etc -->
        </div>

        <!--语言选择栏 开始-->
        <div class="btn-group pull-right">
          <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">中文
            <span class="caret"></span>
          </a>
          <ul class="dropdown-menu" id='weblang'>
            <!-- dropdown menu links -->
            <li><a href="javascript:;" id='btn_cn'>简体中文</a></li>
            <li><a href="javascript:;" id='btn_cht'>繁体中文</a></li>
            <li><a href="javascript:;" id='btn_en'>英文</a></li>

          </ul>
        </div>
        <!--语言选择栏 结束-->

      </div>
    </div>
  </div>
  <!--导航栏  结束-->

  <!--联系我们 开始-->
  <div class="contact-us-btn-cont">
    <span>聯繫我們</span>
    <a href="{:U('index/contact')}">
      <img title="聯繫我們" class="icon" src="__IMG__/btn-service.png">
    </a>
  </div>
  <!--联系我们 结束-->
  <script>

  function GetQueryString(name)
  {
       var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
       var r = window.location.search.substr(1).match(reg);
       if(r!=null)return  unescape(r[2]); return null;
  }
	
  	var _langs = GetQueryString('to');
  //	_langs = _langs ? _langs : 'cn';
 	window.onload = function() { 
 		if (_langs == null) {
 			
	 		location.href = 'http://translate.baiducontent.com/transpage?tn=74039078_dg&source=url&from=cht&to=zh&query=http://allsins18k.com.hk';
 		}
 		};  	
  	
 	$('#btn_cn').click(function(){
      event.preventDefault()
 	  location.href = 'http://translate.baiducontent.com/transpage?tn=74039078_dg&source=url&from=cht&to=zh&query=http://allsins18k.com.hk';
  	})
  	$('#btn_cht').click(function(event){
  		//location.href = "{:U('index')}?to=en";
        event.preventDefault()
      location.href = 'http://allsins18k.com.hk?to=index';
  	})
  	$('#btn_en').click(function(){
  		//location.href = "{:U('index')}?to=en";
  		location.href = "https://allsins18k.shoplineapp.com";
  	})

  	//自动计算导航高度
  	var nav_height =  $('#as_nav').height()
	if (nav_height > 80) {
		$('#as_nav li a').css('padding','0 10px')
	}
  		

  </script>



